﻿using DocumentFormat.OpenXml.Lite.DrawingML.Geometry;
using DocumentFormat.OpenXml.Lite.DrawingML.Text;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Visual
{
    [XmlRoot("blipFill", Namespace = Constants.Main)]
    public class BlipFill : XmlSerializable, IFillProperty
    {
        [Optional]
        [XmlAttribute("dpi", Form = XmlSchemaForm.Qualified)]
        public Nullable<uint> Dpi { get; set; }

        [Optional]
        [XmlAttribute("rotWithShape", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> RotateWithShape { get; set; }

        [Optional]
        [XmlElement("blip", Namespace = Constants.Main)]
        public Blip Blip { get; set; }

        [Optional]
        [XmlElement("srcRect", Namespace = Constants.Main)]
        public Rectangle SourceRectangle { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public IFillModeProperty Element { get; set; }

        public BlipFill() { }
    }
}
